<?php

 class Application_Model_Watch_Ogladaj extends Zend_Db_Table_Abstract {
     protected $_name = 'film';
     
     public function ogladajsd($tytul){
     	$db = Zend_Db_Table::getDefaultAdapter();
     	$select = $db->select();
     	$select->from('movie');
     	$select->where('title = ?',"$tytul");
        $select->where('idmovietype = ?',"1");
     	$film = $db->fetchAll($select);
     	return $film;
     }
     public function ogladajhd($tytul){
     	$db = Zend_Db_Table::getDefaultAdapter();
     	$select = $db->select();
     	$select->from('movie');
     	$select->where('title = ?',"$tytul");
        $select->where('idmovietype = ?',"2");
     	$film = $db->fetchAll($select);
     	return $film;
     }
     public function ogladajserial($tytul){
     	$db = Zend_Db_Table::getDefaultAdapter();
     	$select = $db->select();
     	$select->from('movie');
     	$select->where('title = ?',"$tytul");
        $select->where('idmovietype = ?',"3");
     	$film = $db->fetchAll($select);
     	return $film;
 }
     public function ogladajjunior($tytul){
     	$db = Zend_Db_Table::getDefaultAdapter();
     	$select = $db->select();
     	$select->from('movie');
     	$select->where('title = ?',"$tytul");
        $select->where('idmovietype = ?',"4");
     	$film = $db->fetchAll($select);
     	return $film;
 }
 
 }